<template>
    <div class="demo-list" v-if="this.content">
		<h1 class="title">通知公告</h1>
        <p class="time meta">{{this.content.created_at}}</p>
        <p class="text">
            {{this.content.content}}
        </p>
    </div>
</template>

<script>
    import api from '../../libs/api';

    export default {
        props: [],
        data() {
            return {
                itemsList: null,
                searchVal: '',
                content:{}
            };
        },
        computed: {
            
        },
        mounted() {
            
        },
        methods:{
            search:function(params) {
                let self = this;
                console.log(self.searchVal)
                // api.article.list().then(function(result) {
                //     console.log(result)
                //     if(result && result.code == 200){
                //         self.itemsList = result.data.data
                //     }
                // });
            }
        },
        created(){
            let self = this;
            let id = this.$route.query.listId;
            console.log(id)
            api.article.detail(id).then(function(result) {
                console.log(result)
                if(result && result.code == 200){
                    self.content = result.data
                }else if(result.code == 1200){
                    alert(result.code)
                    let l = window.location.href;
                    window.location = 'http://lres.gzhc365.com/ggyy/api/auth/wx_authorize?return_url='+l
                }
            });
            console.log()
        }
    }
</script>
<style>
.demo-list{
    padding: 15px 15px 0 15px;
    position: relative;
    background: #fff;
}
.meta {
    font-size: 12px;
    color: #888;
    line-height: 18px;
    overflow: hidden;
    margin-bottom: 14px;
    text-align: center;
}
.demo-list .title {
    font-size: 2.25rem;
    padding: 16px 0 15px;
    font-family: PingFangSC-Semibold;
    color: #3f4146;
    letter-spacing: 0;
    line-height: 28px;
    font-weight: 400;
    text-align: center;
}
.demo-list .text {
    line-height: 2.5rem;
    word-wrap: break-word;
    margin-bottom: 27px;
    text-align: justify;
    word-break: break-all;
    color: #3f4146;
    font-size: 17px;
    text-indent:2em;
}
.text img {
    margin-bottom: 16px;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    border-radius: 3px;
}
</style>

